<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<link rel="stylesheet" type="text/css" href="script/zTree/css/zTreeStyle/zTreeStyle.css" />
<link rel="stylesheet" type="text/css" href="pages/system/css/resourceMng.css" />

<style>

	.modal-body{
		max-height:none;
	}
	
	input[type="checkbox"]:not(.checkboxes) {
	    cursor: auto;
	}

	ul.ztree  
    {  
        margin-top: 10px;  
        border: 1px solid #617775;  
        background: #f0f6e4;  
        width: 208px;  
        height: 140px;  
        overflow-y: scroll;  
        overflow-x: auto;  
    }  
    #resContent {
		display: none; 
		position: absolute;
		z-index: 100;
	}
</style>

<div class="row-fluid">
	<div class="span12">
		<div class="row-fluid">
			<div class="span12">
				<ul class="breadcrumb">
					<li>
						<span class="c-999">系统管理</span> 
						<i class="icon-angle-right"></i>
					</li>
					<li><a class="c-666" onclick="util.showContent('pages/system/resourceMng.jsp')">资源管理</a></li>
				</ul>
			</div>
		</div>
		
		<!--搜索框 str-->
		<div class="search-box">
			<div class="search-title">
				<span class="search-criteria c-666">&nbsp;查询条件</span>
			</div>
			<table class="search-body" border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td>
						<label class="my-label">资源名称：<input class="my-input" type="text" id="query_resName"/></label>
						<label class="my-label">资源类型：
							<select id="query_resType" tabindex="1" class="my-select">
							    <option value="" selected="selected">全部</option>
							    <option value="1">模块</option>  
							    <option value="2">页面</option>  
							    <option value="3">按钮</option>  
							</select>
						</label>
					</td>
				</tr>
			</table>
		    <ul class="search-button">
				<li>
					<button class="btn blue" id="btn_query">查&nbsp;&nbsp;询</button>
				</li>
				<li>
					<button class="btn blue" id="btn_reset">重&nbsp;&nbsp;置</button>
				</li>
		   </ul>
		</div>
		<!--搜索框 end-->
		<div class="portlet box green">
			<div class="portlet-title">
				<div class="caption">
					<i class="icon-reorder"></i>列表详情
				</div>
			</div>
			<div class="portlet-body" style="min-height:370px;">
				<p>            
					<button type="button" class="btn blue hide" data-toggle="modal" id="sys_resource_table_new">新&nbsp;&nbsp;增</button>         
					<button type="button" class="btn green hide" data-toggle="modal" id="sys_resource_table_edit">编&nbsp;&nbsp;辑</button>
					<button type="button" class="btn red hide" data-toggle="modal" id="sys_resource_table_del">删&nbsp;&nbsp;除</button>
				</p>
				<table class="table table-striped table-hover table-bordered" id="sys_resource_table">
					<thead>
						<tr>
							<th class="sorting_asc_disabled" style="width:8px;"><input
								type="checkbox" class="group-checkable"
								data-set="#sys_resource_table .checkboxes" />
							</th>
							<th class="sorting_asc_disabled" style="width:45px;">序号</th>
							<th class="fourMinWidth">菜单名称</th>
							<th class="fourMinWidth">URL</th>
							<th class="twoMinWidth">排序</th>
						</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>

<!-- 模态窗口 str -->
<jsp:include page="/pages/common/modal.jsp"></jsp:include>
<!-- 新增资源 -->
<div id="add-resource" class="modal hide fade _hidden_bs_modal" tabindex="-1" data-focus-on="input:first">
	<div class="modal-header add-modal-header bg-green c-bold c-fff" id="addResource_title">
		新增资源
	</div>
	<div class="modal-body add-modal-body">
		<form id="resource_form">
			<input name="form_id" id="form_id" class="hide" value=""/>
			<table class="table">
				<tr>
					<td>
						<span class="al-right"><i class="c-red">*&nbsp;</i>资源名称：</span><input type="text" id="resName" name="resName" maxlength="15"/>
					</td>
					<td>
						<span class="al-right">&nbsp;上级资源：</span><input type="text" id="parentName" name="parentName" readonly onclick="showMenu(); return false;" />
					    <input type="hidden" id="parentId" name="parentId" value="" /> 
					    <div id="resContent">  
				            <ul id="resTreeDemo" class="ztree">  
				            </ul>  
					    </div>
					</td>
				</tr>
				<tr>
					<td>
						<span class="al-right"><i class="c-red">*&nbsp;</i>资源类型：</span><select id="resType" name="resType">
						</select> 
					</td>
					<td>
						<span class="al-right"><i class="c-red">*&nbsp;</i>资源URL：</span><input type="text" id="resUrl" name="resUrl" maxlength="1330"/>
					</td>
				</tr>
				<tr>
					<td>
						<span class="al-right"><i class="c-red">*&nbsp;</i>排序：</span><input type="text" id="resSort" name="resSort" maxlength="4"/>
					</td>
					<td>
						<span class="al-right">&nbsp;备注：</span><input type="text" id="remark" name="remark" maxlength="500"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<div class="modal-footer al-center bg-fff">
		<button type="button" class="btn green" style="margin-right: 25px;" id="form_resource_save">保存</button>
		<button type="button" data-dismiss="modal" class="btn red" id="form_btn_close">取消</button>
	</div>
</div>

<script type="text/javascript" src="script/zTree/js/jquery.ztree.core.min.js"></script>
<script type="text/javascript" src="pages/system/js/resourceMng.js"></script>
<script type="text/javascript" src="media/js/ui-modals.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function() {
		sysResourceTable.init();
		App.initUniform();
	});
</script>

